#include "TimeStepSize.h"
TimeStepSize::TimeStepSize(const ImpingementParameter& ImpingePara_in, const Particle& p_in)
{
	double multiplier = 10.0;
	double multiplier2 = 0.2;
	double multiplier3 = 10.0;
	if (ImpingePara_in.shortDist <= multiplier * p_in.diam)
	{
		timeStepSize = multiplier2 * p_in.diam / sqrt(p_in.V[0] * p_in.V[0] + p_in.V[1] * p_in.V[1]);
	}
	else
	{
		timeStepSize = multiplier3 * p_in.diam / sqrt(p_in.V[0] * p_in.V[0] + p_in.V[1] * p_in.V[1]);
	}
}